package com.mark.web.data.service;

import com.github.pagehelper.PageInfo;
import com.mark.common.ServerResponse;
import com.mark.web.data.entity.vo.OrderVo;

/**
 * @Description: 订单模块Service层接口的设计
 * @Author: Mark
 * @CreateDate: 2018/3/29.
 * @Version: 2.0
 * @Copyright : 豆浆油条个人非正式工作室
 */
public interface IOrderService {
    /**
     * 创建订单
     * @param currentUserId：当前的用户id
     * @param shippingId：订单的收货地址id
     * @return ：返回订单列表(根据卖家进行分组)如：订单列表中的商品包含了3个卖家，那么应该返回三个订单号
     */
    ServerResponse createOrder(Integer currentUserId, Integer shippingId);

    ServerResponse cancelOrder(Integer currentUserId, Long orderNo);

    /**
     * 3.获取购物车中已经选中的商品详情提交订单时候调用
     * @param currentUserId:当前的用户id
     * @return :
     */
    ServerResponse getOrderCartProduct(Integer currentUserId);

    ServerResponse getOrderDetail(Integer currentUserId, Long orderNo, Integer sellerId);

    /**
     * 查看订单列表
     * @param currentUserId ：当前的用户id
     * @param pageNum：页数
     * @param pageSize：页面大小
     * @return ：
     */
    ServerResponse getOrderList(Integer currentUserId, int pageNum, int pageSize);

    ServerResponse<PageInfo> manageList(int pageNum, int pageSize);

    ServerResponse<OrderVo> manageDetail(Long orderNo);

    ServerResponse<PageInfo> manageSearch(Long orderNo, int pageNum, int pageSize);

    ServerResponse<String> manageSendGoods(Long orderNo);

    ServerResponse getSellerOrderList(Integer sellerId, int pageNum, int pageSize);

    ServerResponse<String> sellerSendGoods(Long orderNO, Integer sellerId);

    ServerResponse getGoods(Integer id, Long orderNo);

    ServerResponse<PageInfo> sellerSearchOrder(Long orderNo, int pageNum, int pageSize, Integer id);

    ServerResponse<PageInfo> searchOrderPayed(int pageNum, int pageSize, Integer id);
}
